import {View} from '@tarojs/components'
import {IconImg} from '../images'

const AllowRight: React.FC<{
  count?: number
  iconHeight?: number
  iconWidth?: number
}> = ({count, iconHeight = 30, iconWidth = 26}): JSX.Element => {
  return count && count > 99 ? (
    <View className="w-21 h-21 text-white text-10 rounded-full bg-danger flex items-center justify-center">
      {count > 99 ? '99+' : count}
    </View>
  ) : (
    <IconImg
      imgName="allowRight"
      width={iconWidth}
      height={iconHeight}
    ></IconImg>
  )
}

export default AllowRight
